<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="" method="post">
    {% csrf_token %}
    <input type="text" name="wd">
    <input type="submit" value="搜索">
</form>
<table border="4">
    <tr align="center">
    <td>序号</td>
    <td>处方名称</td>
    <td>诊断结果</td>
    <td>诊断医生</td>
    <td>患者</td>
    <td colspan="2">操作</td>
    </tr>
    {% for foo in doctor %}
        <tr align="center">
        <td>{{ foo.id }}</td>
        <td>{{ foo.cname }}</td>
        <td>{{ foo.result }}</td>
        <td>{{ foo.doctor.truename }}</td>
        <td>{{ foo.hname }}</td>
        <td><a href="{% url 'app1:recipe_update' foo.id%}">修改</a></td>
        <td><a href="{% url 'app1:recipe_del' foo.id%}">删除</a></td>
        </tr>
    {% endfor %}
{% if page > 1  %}
    <a href="{% url 'app1:recipes' %}?page={{ page|add:-1 }}&wd={{ wd }}">上一页</a>
{% endif %}
当前页:{{page}}
{% if page < max %}
    <a href="{% url 'app1:recipes' %}?page={{ page|add:1 }}&wd={{ wd }}">下一页</a>
{% endif %}

</table>
<a href="{% url 'app1:recipe_add' %}">添加</a>
</body>
</html>